<?
//引入所有子系统信息
include_once("../../../common/script/extender_import.php");

//获取板块的设置
include_once("model/setting.php");



//根据页面数量信息，筛选信息，创造url，供页码,跳转等使用
include_once("script/set_url.php");


$_plate=select_one_line_all_items($table_Prefix."plate","mid = 'department'");

//用来判断当前系统属于什么板块
$system_part = $plate['mid'];


    //$department_list = cat_list(0, 0, true);

    //按结构输出部门的树
    $school_list=select_lines_all_items($table_prefix."department","nid desc","parent_id = 0","");

    //$school_list=transform_2darray_in_1darray_number_as_key($school_list,"name");

    //循环，查找数据库中，parent_nid = 当前的 nid的值
    foreach($school_list as $key=>$value){
        $school_list[$key][$value['name']]=select_lines_all_items($table_prefix."department","name asc",
            "parent_id = '{$value['nid']}'","");

        //循环，$school_list[$key]['grade'] 的数据，查找数据库中，parent_nid = 当前的 nid的值，记录在class
        foreach($school_list[$key][$value['name']] as $k=>$v){
            $school_list[$key][$value['name']][$k][$v['name']]=select_lines_all_items($table_prefix."department",
                "name asc","parent_id = '{$v['nid']}'","");
        }
    }




?>

